﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <string.h>
#include <math.h>
#include <unordered_map>
using namespace std;

class Solution {
public:
    int massage(vector<int>& nums) {
        int n = nums.size();
        if (n == 0) return 0;
        vector<int> dp(n + 1, 0);
        auto dp1 = dp;
        dp[0] = nums[0];
        for (int i = 1; i < n; i++)
        {
            dp[i] = dp1[i - 1] + nums[i];
            dp1[i] = max(dp1[i - 1], dp[i - 1]);
        }
        return max(dp[n - 1], dp1[n - 1]);
    }
};

int main()
{
    return 0;
}
